/**
 * 
 */
package com.study.handler.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.study.handler.entity.GatewayHandlerEntity;

/**
 * @author Administrator
 * @date 2019年5月10日
 */
public interface GatewayHandlerMapper {

	@Select("SELECT  handler_name AS handlerName,handler_id AS handlerid ,prev_handler_id AS prevhandlerid ,next_handler_id AS nexthandlerid  FROM gateway_handler WHERE  prev_handler_id is null;")
	public GatewayHandlerEntity getFirstGateWay();

	@Select("SELECT  handler_name AS handlerName,handler_id AS handlerid ,prev_handler_id AS prevhandlerid ,next_handler_id AS nexthandlerid   FROM gateway_handler WHERE  handler_id=#{handlerId}")
	public GatewayHandlerEntity getByHandler(String handlerId);

}
